/**
 *       Copyright (c) 2012 Lukas Zaruba
 *
 *   This file is part of Robot Playground.
 *
 *   Robot Playground is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU Lesser General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   Robot Playground is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU Lesser General Public License for more details.
 *
 *   You should have received a copy of the GNU Lesser General Public License
 *   along with Robot Playground. If not, see <http://www.gnu.org/licenses/>.
 */
package net.zarubsys.robotplayground.scriptprogram;

import java.io.Reader;
import java.util.Map;

import net.zarubsys.robotplayground.core.program.IProgramConfiguration;

/**
 * ScriptProgramConfiguration
 *
 * @author Lukas Zaruba, lukas.zaruba@gmail.com
 */
public abstract class AbstractScriptProgramConfiguration implements IProgramConfiguration {
	
	private static final long serialVersionUID = 7983411077447777328L;
	
	private final String variablePoolName;
	private final Map<String, Object> initState;
	
	public AbstractScriptProgramConfiguration(String variablePoolName, Map<String, Object> initState) {
		this.variablePoolName = variablePoolName;
		this.initState = initState;
	}
	
	/**
	 * Implementation of this method should return open and ready instance
	 * of {@link Reader}.
	 * Caller is responsible for proper closing of the reader
	 */
	public abstract Reader getProgramReader();

	public String getVariablePoolName() {
		return variablePoolName;
	}

	public Map<String, Object> getInitState() {
		return initState;
	}

}

